home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload Trio 2
/
Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO
/
dir39
/
cmos16.zip
/
CHKCMOS.BAT
next >
Wrap
DOS Batch File
|
1994-08-28
|
2KB
|
62 lines
@ECHO OFF
::REM CHKCMOS.BAT -- ensures CMOS not damaged, repairs if it is.
::REM last updated by Roedy Green of Canadian Mind Products 94/08/04
::REM Insert to this in AUTOEXEC.BAT to check CMOS.
::REM For this bat file to work you must first SET EXEDIR=C:\SYS or whereever
::REM you keep your utilities.
::REM You will need NEED.com CMOSChk.com CMOSSave.com and Reboot.com
::REM These are shareware utilities from Canadian Mind Products.
::REM The directory C:\SAFE must exist.
::REM Only check CMOS on the AT-style BIOS
%EXEDIR%\NEED.COM AT > NUL:
IF Errorlevel 1 GOTO DONE
IF NOT EXIST C:\SAFE\CMOS.SAV GoTo MakeIt
%EXEDIR%\CMOSChk.COM C:\SAFE\CMOS.SAV
IF NOT Errorlevel 1 GOTO DONE
::REM CMOS check failed:
::REM could be 2 reasons:
::REM 1. CMOS has been illegitimately tampered with
::REM 2. CMOS has been deliberately changed,
::REM Clever user will have to abort, and delete C:\SAFE\CMOS.SAV
::REM or delete before before making changes.
::REM A new CMOS.SAV will be automatically
::REM generated. It should be copied to the rescue diskette.
::REM Warn consultants confounded by CMOSREST undoing their CMOS changes.
Echo.To deliberately change CMOS, see the instructions in C:\BAT\CHKCMOS.BAT.
Echo.
Echo.Abort now with Ctrl-Break if you do not wish to restore damaged CMOS.
Echo.Normally you should just hit the SPACE BAR to repair CMOS.
Pause
::REM try restoring
%EXEDIR%\CMOSREST.COM C:\SAFE\CMOS.SAV
IF NOT Errorlevel 1 GOTO Reboot
Echo CMOS is still corrupted
Pause
:Reboot
%EXEDIR%\Reboot.Com
:MakeIt
::REM Build a NEW CMOS.SAV file
Echo Recreating C:\SAFE\CMOS.SAV file.
%EXEDIR%\MD! C:\SAFE
%EXEDIR%\CMOSSAVE.COM C:\SAFE\CMOS.SAV
Echo You might also want to create a new A: Rescue floppy boot disk soon
Echo Use CMOSSAVE A:\CMOS.SAV
Pause
:DONE
::REM -30-